<template>
  <div>
    <Header></Header>
    <router-view></router-view>
    <!-- 第1种隐藏底部的方式 -->
    <!-- <Footer v-show="$route.path!=='/login'&&$route.path!=='/register'"></Footer> -->
    <Footer v-show="!$route.meta.isHiddenFooter"></Footer>
  </div>
</template>

<script>
import Header from './components/Header/index.vue'
import Footer from './components/Footer' // index.vue可以省略
export default {
  name:'App',
  components:{Header,Footer},
  mounted(){
    // console.log(this.$route);  // 打印一下路由规则路径
    // console.log(this.$route.path);
    // 优化TypeNav中发送请求获取数据
    this.$store.dispatch("home/getCategoryListData");
  }
}
</script>

<style>

</style>
